package models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;

import play.db.jpa.Model;

@Entity
public class Message extends Model {
	
	@Lob
	private String subject;
	
	@Lob
	private String message;
	
	private Date date;
	
	@ManyToOne
	private User sender;
	
	@ManyToOne
	private User receiver;
	
	public Message(String subject, String message, Date date, User sender, User receiver) {
		super();
		this.subject = subject;
		this.message = message;
		this.sender = sender;
		this.receiver = receiver;
		this.date = date;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public User getSender() {
		return sender;
	}

	public void setSender(User sender) {
		this.sender = sender;
	}

	public User getReceiver() {
		return receiver;
	}

	public void setReceiver(User receiver) {
		this.receiver = receiver;
	}
	
	
	
}
